HTMLify

style.css
Views: 39 | Author: cody
@import url("https://fonts.googleapis.com/css2?family=Heebo:wght@100..900&family=Oswald:wght@300..700&&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ff-body: "Heebo", sans-serif;
  --ff-heading: "Oswald", sans-serif;

  --clr-primary-400: hsl(60 100% 50%);
  --clr-neutral-900: hsl(0 0% 0%);
  --clr-neutral-100: hsl(0 0% 100%);

  --fs-xl: clamp(3rem, 1rem + 10vw, 6rem);
  --fs-600: 2rem;
  --fs-500: 1.5rem;
  --fs-400: 1.125rem;
}

body,
h1,
h2,
h3,
p,
blockquote {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-400);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

h1,
blockquote {
  font-family: var(--ff-heading);
  font-weight: 900;
}

h1 {
  font-size: var(--fs-xl);
  line-height: 1;
  text-transform: uppercase;
}

blockquote {
  font-size: var(--fs-600);
  line-height: 1.2;
  text-align: center;
  margin-bottom: 1em;
}

blockquote::before {
  content: open-quote;
}

blockquote::after {
  content: close-quote;
}

article {
  display: grid;
}

article > *:not(img) {
  padding: 0 2rem;
}

.lead {
  font-size: var(--fs-500);
  max-width: 40ch;
  padding: 1rem 2rem;
}

.flow > * + * {
  margin-top: 1em;
}

.article-body {
  columns: 2 30ch;
  gap: 4rem;
  max-width: 100ch;
}

.article-body > p:first-child::first-letter {
  font-size: 4em;
  float: left;
  line-height: 1;
  margin: -5px 5px -10px -5px;
}

.article-body > p:first-child::first-line {
  font-weight: 500;
}

@media (min-width: 50em) {
  article {
    grid-template-columns: min(40%, 40rem) 1fr;
  }

  article > img {
    grid-row: 1 / 4;
    height: 100%;
    object-fit: cover;
  }

  article > *:not(img) {
    grid-column: 2 / -1;
  }
}

Comments